var Chip = new Class({
	Extends: Thing,
	
	initialize: function(radius, color, borderColor, text, top, left) {
		this.parent(top, left);
		this.radius = radius;
		this.color = color;
		this.borderColor = borderColor;
		this.text = text;
		this.clonetop = top;
		this.cloneleft = left;
		this.create();
	},
	
	create: function(color, borderColor) {
		var chip = new Element('div', {
			styles: {
				width: 2 * this.radius,
				height: 2 * this.radius,
				'border-color': this.borderColor,
				'border-style': 'solid',
				'border-width': '2px',
				'-webkit-border-radius': this.radius + 'px', /* Saf3-4 */
				'-moz-border-radius': this.radius + 'px', /* FF1-3.6 */
				'border-radius': this.radius + 'px', /* Opera 10.5, IE9, Saf5, Chrome, FF4 */
				color: this.borderColor,
				'font-size': (2 * this.radius - 5) + 'px',
				'font-weight': 'bold',
				'text-align': 'center',
				'background-color': this.color
			},
			text: this.text
		});
		this.include(chip);
	},
	
	included: function() {
		this.drag.addEvent('start', (function() {
			new Chip(this.radius, this.color, this.borderColor, this.text, this.clonetop, this.cloneleft);
		}).bind(this));
	}
});